<?php
/**
 * User: xialei
 * Date: 2016/6/28 0028
 * Time: 16:42
 */

namespace app\assets;


use yii\web\AssetBundle;
use yii\web\View;

class AdminAsset extends AssetBundle
{
    public $basePath = '@webroot/dashboard';
    public $baseUrl = '@web/dashboard';
    public $css = [
    ];
    public $js = [
        'dist/vendor.bundle.js',
        'dist/dashboard.bundle.js',
    ];
    public $depends = [
        'yii\bootstrap\BootstrapPluginAsset'
    ];

    public function init()
    {
        parent::init();
        if (YII_ENV_DEV) {
            $this->baseUrl = 'http://192.168.0.144:8011';
            $this->js = [
                'webpack-dev-server.js',
                'dashboard/dist/dashboard.bundle.js'
            ];
        }
    }
}